package com.atguigu.srb.core.service;

import com.atguigu.srb.core.pojo.entity.Lend;
import com.atguigu.srb.core.pojo.vo.LendDetailVO;
import com.atguigu.srb.core.pojo.vo.LendSearchVO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.math.BigDecimal;
import java.util.List;

/**
 * <p>
 * 标的准备表 服务类
 * </p>
 *
 * @author Atguigu
 * @since 2024-04-15
 */
public interface LendService extends IService<Lend> {

    List<Lend> getLendList();

    LendDetailVO getLendDetailById(Long lendId);

    Page<Lend> getLendListWithCondition(LendSearchVO lendSearchVO, Integer pageNum, Integer pageSize);

    BigDecimal getIncome(BigDecimal amount, BigDecimal yearRate, Integer period, Integer returnMethod);

    String invest(String token, BigDecimal investAmount, Long lendId);

    void updateLendInvestAmountAndNumber(String lendId, BigDecimal voteAmt);
}
